import request from '../utils/request';

export const sysDictDataPage = query => {
    return request({
        url: '/sysDictData/page',
        method: 'get',
        params: query
    });
};

export const saveSysDictData = data => {
    return request({
        url: '/sysDictData/save',
        method: 'post',
        data: data
    });
};

export const updateSysDictData = data => {
    return request({
        url: '/sysDictData/update',
        method: 'put',
        data: data
    });
};

export const delSysDictData = data => {
    return request({
        url : '/sysDictData/delete/' + data,
        method: 'delete'
    });
};

// 根据字典类型查询字典数据信息
export const getDicts = query => {
    return request({
        url: '/sysDictData/dictType/' + query,
        method: 'get'
    })
}